<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="/includes/header.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title><fmt:message key="title.short" /></title>
<link href="${pageContext.request.contextPath}/css/main.css"
	rel="stylesheet" />
<link href="http://twitter.github.com/bootstrap/assets/css/docs.css"
	rel="stylesheet" />
<link
	href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css"
	rel="stylesheet" />
<link
	href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css"
	rel="stylesheet" />
</head>

<body>
	<%@include file="/includes/navbar.jsp"%>

	<div class="container">
		<div class="row">
			<div class="span10">

				<form id="edit-profile" class="form-horizontal" method="post" action="UserEditController">
					<fieldset>
						<legend>
							<fmt:message key="edityourprofile" />
						</legend>

						<div class="control-group">
							<label class="control-label" for="username"><fmt:message
									key="user_name" /></label>
							<div class="controls">
								<input type="text" class="input-medium disabled" id="username"
									name="user_name"
									value="${user.loginName}" />
								<p class="help-block">
									<fmt:message key="user_name.constraint" />
								</p>
							</div>
							<!-- /controls -->
						</div>
						<br />
						<!-- /control-group -->


						<div class="control-group">
							<label class="control-label" for="firstname"><fmt:message
									key="first_name" /></label>
							<div class="controls">
								<input type="text" class="input-medium" id="firstname"
									name="first_name"
									value="${user.firstName}" />
							</div>
							<!-- /controls -->
						</div>
						<!-- /control-group -->


						<div class="control-group">
							<label class="control-label" for="lastname"><fmt:message
									key="last_name" /></label>
							<div class="controls">
								<input type="text" class="input-medium" id="lastname"
									name="last_name"
									value="${user.lastName}" />
							</div>
							<!-- /controls -->
						</div>
						<!-- /control-group -->


						<div class="control-group">
							<label class="control-label" for="email"><fmt:message
									key="email" /></label>
							<div class="controls">
								<input type="text" class="input-large" id="email"
									name="user_email"
									value="${user.email}" />
							</div>
							<!-- /controls -->
						</div>
						<!-- /control-group -->

						<div class="control-group">
							<label class="control-label" for="password1"><fmt:message
									key="password" /></label>
							<div class="controls">
								<input type="password" class="input-medium" id="password1"
									name="user_password"
								/>
							</div>
							<!-- /controls -->
						</div>
						<!-- /control-group -->


						<div class="control-group">
							<label class="control-label" for="password2"><fmt:message
									key="confirm_password" /></label>
							<div class="controls">
								<input type="password" class="input-medium" id="password2" />
							</div>
							<!-- /controls -->
						</div>

						<div class="control-group">
							<label class="control-label" for="country"><fmt:message
									key="country" /></label>
							<div class="controls">
								<input type="text" class="input-medium" id="country"
									name="country"
									value="${user.country}" />
							</div>
							<!-- /controls -->
						</div>
						<!-- /control-group -->


						<div class="control-group">
							<label class="control-label" for="city"><fmt:message
									key="city" /></label>
							<div class="controls">
								<input type="text" class="input-medium" id="city"
									name="city"
									value="${user.city}" />
							</div>
							<!-- /controls -->
						</div>
						<!-- /control-group -->


						<div class="control-group">
							<label class="control-label" for="signature"><fmt:message
									key="signature" /></label>
							<div class="controls">
								<input type="text" class="input-medium" id="signature"
									name="signature"
									value="${user.signature}" />
							</div>
							<!-- /controls -->
						</div>
						<!-- /control-group -->

						<div class="control-group">
							<label class="control-label" for="lastname"><fmt:message
									key="birthdate" /></label>
							<div class="controls">
								<input type="text" class="input-medium" id="birthDate"
									name="birthDate"
									value="Make this date picker" />
							</div>
							<!-- /controls -->
						</div>
						<!-- /control-group -->

						<div class="control-group">
							<label class="control-label" for="input01"><fmt:message
									key="gender" /></label>
							<div class="controls">
								<select name="gender" id="gender">
									<option value="">
										<fmt:message key="select" />
									</option>
									<option value="m"
										<c:if test="${user.gender eq 'm'.charAt(0)}">selected="selected"</c:if>>
										<fmt:message key="gender.male" />
									</option>
									<option value="f"
										<c:if test="${user.gender eq 'f'.charAt(0)}">selected="selected"</c:if>>
										<fmt:message key="gender.female" />
									</option>

								</select>

							</div>

						</div>

						<div class="control-group">
							<label class="control-label" for="shortBio"><fmt:message
									key="shortbio" /></label>
							<div class="controls">
								<textarea class="input-large" id="shortBio" name="shortBio">
									${user.shortBio}
								</textarea>
							</div>
							<!-- /controls -->
						</div>
						<!-- /control-group -->

						<div class="pull-right">
							<button type="submit" class="btn">
								<fmt:message key="save" />
							</button>
							<button class="btn">
								<fmt:message key="cancel" />
							</button>
						</div>
						
						<c:if test="${message != null}">
								<br />
								<br />
								<c:choose>
									<c:when test="${signal eq 'false'}">
										<div id="msg" class="alert alert-error">${message}</div>
									</c:when>
									<c:otherwise>
										<div id="msg" class="alert alert-success">${message}</div>
									</c:otherwise>
								</c:choose>
							</c:if>	
						<!-- /form-actions -->
					</fieldset>
				</form>
			</div>
		</div>
	</div>

	<%@include file="/includes/footer.jsp"%>
</body>
<script src="http://twitter.github.com/bootstrap/assets/js/jquery.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-alert.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-modal.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-scrollspy.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-tab.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-tooltip.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-popover.js"></script>
<script type="text/javascript"
	src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>
	
<script type="text/javascript">
	$(function(){
		setTimeout(function(){$("#msg").hide(200);}, 5000);
	});
</script>
</html>
